package nl.saxion.act.main_menu;

import nl.saxion.act.playground.R;
import nl.saxion.act.playground.R.layout;
import nl.saxion.act.playground.R.menu;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.widget.ImageView;
import android.widget.TextView;

public class InstructionActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.instruction);
		
		TextView textView1 = (TextView) findViewById(R.id.text_instruction1);
		textView1.setText("The key to winning a game of 'BoloBall' is to acquire more points in a round than your opponent. " +
				"Points are gathered when a player rolls one of his playable balls down the board. " +
				"The closer the ball ends to the bodem, more points will be rewarded for that roll.");
		
		TextView textView2 = (TextView) findViewById(R.id.text_instruction2);
		textView2.setText("On it's way down, the ball can meet certain game-objects. " +
				"These objects have an effect on the path of the ball, " +
				"give bonuses, or can even completely stop it which will result in less rewarded points.");
		
		TextView textView3 = (TextView) findViewById(R.id.text_instruction3);
		textView3.setText("This object represents the player.\nThe colour shows which player is up for a turn, and it's current position.");
		
		ImageView imageView1= (ImageView) findViewById(R.id.image_instruction1);
		imageView1.setImageDrawable(getResources().getDrawable(R.drawable.playertile));
		
		TextView textView4 = (TextView) findViewById(R.id.text_instruction4);
		textView4.setText("The ball.\nIn the upper row, this ball is in it's initial state and ready to be rolled down the board. " +
				"Any balls that are not positioned in the upper row are allready played and will have a grey background.");
		
		ImageView imageView2= (ImageView) findViewById(R.id.image_instruction2);
		imageView2.setImageDrawable(getResources().getDrawable(R.drawable.blueballtop));
		
		TextView textView5 = (TextView) findViewById(R.id.text_instruction5);
		textView5.setText("And arrow block is the most common object found on the board. When a ball is positioned right above an arrow, " +
				"it will be pushed to the side at which the arrow is pointing. After this event, " +
				"the ball will continue it's usual path down and the arrow will turn around and face into the opposite direction.");
		
		ImageView imageView3= (ImageView) findViewById(R.id.image_instruction3);
		imageView3.setImageDrawable(getResources().getDrawable(R.drawable.arrowright));
		
		TextView textView6 = (TextView) findViewById(R.id.text_instruction6);
		textView6.setText("A ball is not allowed to move through a block. Instead, " +
				"it will stop entirely. At the end of a game, all blocks will be removed from the field. " +
				"If balls are now able to move again, they will fall down and reward players with their last points.");
		
		ImageView imageView4= (ImageView) findViewById(R.id.image_instruction4);
		imageView4.setImageDrawable(getResources().getDrawable(R.drawable.block));
		
		TextView textView7 = (TextView) findViewById(R.id.text_instruction7);
		textView7.setText("When a ball is rolled into a portal, it will randomly respawn out of one of the other available portals.");
		
		ImageView imageView5= (ImageView) findViewById(R.id.image_instruction5);
		imageView5.setImageDrawable(getResources().getDrawable(R.drawable.portal));
		
		TextView textView8 = (TextView) findViewById(R.id.text_instruction8);
		textView8.setText("This is a one-time bonus, that may be picked up by rolling a ball over it. " +
				"It will reward the player with bonus points and then dissappears from the board.");
		
		ImageView imageView6= (ImageView) findViewById(R.id.image_instruction6);
		imageView6.setImageDrawable(getResources().getDrawable(R.drawable.leaf));
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.instruction, menu);
		return true;
	}

}
